package com.blb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.entity.Product;
import com.blb.entity.Relation;
import com.blb.mapper.RelationMapper;
import com.blb.service.IRelationService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-15
 */
@Service
public class RelationServiceImpl extends ServiceImpl<RelationMapper, Relation> implements IRelationService {

    @Resource
    private  RelationMapper relationMapper;

    @Override
    public List<Relation> SupplierCompany(int start, int length,String companyId, String companyProvince, String companyCity, String companyArea, String companyName) {
        return relationMapper.SupplierCompany(start,length,companyId,companyProvince,companyCity,companyArea,companyName);
    }

    @Override
    public int count(String companyId, String companyProvince, String companyCity, String companyArea, String companyName) {
        return relationMapper.count(companyId,companyProvince,companyCity,companyArea,companyName);
    }

    @Override
    public Relation findByCompanyId(String companyId) {
        return relationMapper.findByCompanyId(companyId);
}

    @Override
    public void updateCompany(String rRemark, String companyId) {
        relationMapper.updateCompany(rRemark, companyId);
    }

    @Override
    public List<Product> getSupplierCompanyProductInfo(List<String> ids, String companyId, int start, int length) {
        return relationMapper.getSupplierCompanyProductInfo(ids, companyId, start, length);
    }

    @Override
    public int count1(List<String> ids, String companyId) {
        return relationMapper.count1(ids, companyId);
    }
}
